package cn.com.nes.mybatis.agent.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author nes
 * @since 2022-08-19
 */
@Data
@TableName("t_user")
public class TUser extends Model<TUser> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String uuid;
    /**
     * 用户名，为手机号
     */
    @TableField("username")
    private String username;
    /**
     * 密码，加盐加密
     */
    @TableField("password")
    private String password;
    /**
     * 性别
     */
    private String sex;
    /**
     * 昵称
     */
    @TableField("nickName")
    private String nickName;
    /**
     *  角色ID
     */
    @TableField("role_id")
    private String roleId;
    /**
     * 行政区划代码
     */
    @TableField("areacode")
    private String areacode;
    /**
     * 行政区划代码
     */
    @TableField("areaname")
    private String areaname;
    /**
     * 公司ID
     */
    @TableField("companyId")
    private String companyId;
    /**
     * 部门ID
     */
    @TableField("departmentId")
    private String departmentId;
    /**
     * 人员身份
     */
    private String identity;
    /**
     * 用户职务 安装维修财务
     */
    @TableField("userType")
    private String userType;
    /**
     * openid
     */
    @TableField("openId")
    private String openId;
    private String phone;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 微信
     */
    @TableField("wechat")
    private String wechat;
    @TableField("longitude")
    private BigDecimal longitude;
    @TableField("latitude")
    private BigDecimal latitude;
    /**
     * 创建者uid
     */
    @TableField("createUid")
    private Long createUid;
    /**
     * 创建时间
     */
    @TableField("createTime")
    private Date createTime;
    /**
     * 修改者uid
     */
    @TableField("modifyUid")
    private Long modifyUid;
    /**
     * 修改时间
     */
    @TableField("modifyTime")
    private Date modifyTime;
    /**
     * 是否关联其他系统
     */
    @TableField("isassociated")
    private String isassociated;
    /**
     * 关联id
     */
    @TableField("relevanceid")
    private String relevanceid;
    /**
     * 是否删除:1:表示删除，0:表示未删除
     */
    private Integer sfsc;
    /**
     * 是否在线注册 0 否 1 是
     */
    @TableField("isOnlineReg")
    private Integer isOnlineReg;
    /**
     * 头像
     */
    private String pic;
    /**
     * 是否认证 0 否 1 是
     */
    @TableField("isCert")
    private Integer isCert;
    /**
     * 关联的厂商用户
     */
    @TableField("mfepuser")
    private String mfepuser;

    @TableField("open_id_dy")
    private String openIdDy;

    /**
     * 站点id
     */
    @TableField("station_id")
    private String stationId;
    /**
     * 数据权限
     */
    @TableField("data_range")
    private Integer dataRange;

    /**
     * 易修用户id
     */
    @TableField("easy_repair_user_id")
    private Long easyRepairUserId;
    /**
     * 长效管护用户id
     */
    @TableField("call_center_user_id")
    private Long callCenterUserId;

    @TableField("is_foreman")
    private Integer isForeman;

    public Integer getIsforeman() {
        return isForeman;
    }

    public void setIsforeman(Integer isforeman) {
        this.isForeman = isforeman;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getAreacode() {
        return areacode;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    public String getAreaname() {
        return areaname;
    }

    public void setAreaname(String areaname) {
        this.areaname = areaname;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    public void setLongitude(BigDecimal longitude) {
        this.longitude = longitude;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }

    public Long getCreateUid() {
        return createUid;
    }

    public void setCreateUid(Long createUid) {
        this.createUid = createUid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getModifyUid() {
        return modifyUid;
    }

    public void setModifyUid(Long modifyUid) {
        this.modifyUid = modifyUid;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getIsassociated() {
        return isassociated;
    }

    public void setIsassociated(String isassociated) {
        this.isassociated = isassociated;
    }

    public String getRelevanceid() {
        return relevanceid;
    }

    public void setRelevanceid(String relevanceid) {
        this.relevanceid = relevanceid;
    }

    public Integer getSfsc() {
        return sfsc;
    }

    public void setSfsc(Integer sfsc) {
        this.sfsc = sfsc;
    }

    public Integer getIsOnlineReg() {
        return isOnlineReg;
    }

    public void setIsOnlineReg(Integer isOnlineReg) {
        this.isOnlineReg = isOnlineReg;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public Integer getIsCert() {
        return isCert;
    }

    public void setIsCert(Integer isCert) {
        this.isCert = isCert;
    }

    public String getMfepuser() {
        return mfepuser;
    }

    public void setMfepuser(String mfepuser) {
        this.mfepuser = mfepuser;
    }

    public String getOpenIdDy() {
        return openIdDy;
    }

    public void setOpenIdDy(String openIdDy) {
        this.openIdDy = openIdDy;
    }

    public void setModifyInfo(Long userId, Date operateTime) {
        setModifyUid(userId);
        setModifyTime(operateTime);
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public Integer getDataRange() {
        return dataRange;
    }

    public void setDataRange(Integer dataRange) {
        this.dataRange = dataRange;
    }


    public static final String ID = "id";

    public static final String UUID = "uuid";

    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String SEX = "sex";

    public static final String NICKNAME = "nickName";

    public static final String ROLE_ID = "role_id";

    public static final String AREACODE = "areacode";

    public static final String AREANAME = "areaname";

    public static final String COMPANYID = "companyId";

    public static final String DEPARTMENTID = "departmentId";

    public static final String IDENTITY = "identity";

    public static final String USERTYPE = "userType";

    public static final String OPENID = "openId";

    public static final String PHONE = "phone";

    public static final String EMAIL = "email";

    public static final String WECHAT = "wechat";

    public static final String LONGITUDE = "longitude";

    public static final String LATITUDE = "latitude";

    public static final String CREATEUID = "createUid";

    public static final String CREATETIME = "createTime";

    public static final String MODIFYUID = "modifyUid";

    public static final String MODIFYTIME = "modifyTime";

    public static final String ISASSOCIATED = "isassociated";

    public static final String RELEVANCEID = "relevanceid";

    public static final String SFSC = "sfsc";

    public static final String ISONLINEREG = "isOnlineReg";

    public static final String PIC = "pic";

    public static final String ISCERT = "isCert";

    public static final String MFEPUSER = "mfepuser";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TUser{" +
        ", id=" + id +
        ", uuid=" + uuid +
        ", username=" + username +
        ", password=" + password +
        ", sex=" + sex +
        ", nickName=" + nickName +
        ", roleId=" + roleId +
        ", areacode=" + areacode +
        ", areaname=" + areaname +
        ", companyId=" + companyId +
        ", departmentId=" + departmentId +
        ", identity=" + identity +
        ", userType=" + userType +
        ", openId=" + openId +
        ", phone=" + phone +
        ", email=" + email +
        ", wechat=" + wechat +
        ", longitude=" + longitude +
        ", latitude=" + latitude +
        ", createUid=" + createUid +
        ", createTime=" + createTime +
        ", modifyUid=" + modifyUid +
        ", modifyTime=" + modifyTime +
        ", isassociated=" + isassociated +
        ", relevanceid=" + relevanceid +
        ", sfsc=" + sfsc +
        ", isOnlineReg=" + isOnlineReg +
        ", pic=" + pic +
        ", isCert=" + isCert +
        ", mfepuser=" + mfepuser +
        "}";
    }
}
